package com.mdd.admin.validate;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.*;

@Data
@ApiModel("驾驶员信息创建参数")
public class DriverInfoCreateValidate implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "userNo参数缺失")
    @ApiModelProperty(value = "用户编码")
    private String userNo;

    @NotNull(message = "idCard参数缺失")
    @ApiModelProperty(value = "身份证号")
    private String idCard;

    @NotNull(message = "idValidityTime参数缺失")
    @ApiModelProperty(value = "有效期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date idValidityTime;

    @NotNull(message = "frontUrl参数缺失")
    @ApiModelProperty(value = "身份证正面")
    private String frontUrl;

    @NotNull(message = "oppositeUrl参数缺失")
    @ApiModelProperty(value = "身份证反面")
    private String oppositeUrl;

    @NotNull(message = "driveType参数缺失")
    @ApiModelProperty(value = "准驾车型")
    private Long driveType;

    @NotNull(message = "driveValidityTime参数缺失")
    @ApiModelProperty(value = "驾驶证有效期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date driveValidityTime;

    @NotNull(message = "driveUrl参数缺失")
    @ApiModelProperty(value = "驾驶证照片")
    private String driveUrl;

    @NotNull(message = "issuedDate参数缺失")
    @ApiModelProperty(value = "初领驾驶证时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date issuedDate;

}
